﻿using MiniExcelLibs.Attributes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Zo.ExcelBox.Models
{

    /// <summary>
    /// c
    /// </summary>
    public class JudicialCaseTransactionRecord : TableBase
    {
        /// <summary>
        /// 案件ID
        /// </summary>
        [ExcelIgnore]
        public int JudicialCase_Id { get; set; }

        /// <summary>
        /// 账户类型
        /// </summary>
        [ExcelColumn(Name = "账户类型")]
        public string AccountType { get; set; } = string.Empty;

        /// <summary>
        /// 交易户名
        /// </summary> 
        [ExcelColumn(Name = "交易户名")]
        public string AccountName { get; set; } = string.Empty;

        /// <summary>
        /// 身份证号
        /// </summary>
        [ExcelColumn(Name = "身份证号")]
        public string IdNumber { get; set; } = string.Empty;

        /// <summary>
        /// 交易卡号
        /// </summary>
        [ExcelColumn(Name = "交易卡号")]
        public string CardNumber { get; set; } = string.Empty;

        /// <summary>
        /// 开户银行
        /// </summary>
        [ExcelColumn(Name = "开户银行")]
        public string BankName { get; set; } = string.Empty;

        /// <summary>
        /// 交易账号
        /// </summary>
        [ExcelColumn(Name = "交易账号")]
        public string AccountNumber { get; set; } = string.Empty;

        /// <summary>
        /// 内部账号
        /// </summary>
        [ExcelColumn(Name = "内部账号")]
        public string InternalAccount { get; set; } = string.Empty;

        /// <summary>
        /// 交易时间
        /// </summary>
        [ExcelColumn(Name = "交易时间", Format = "yyyy-MM-dd HH:mm:ss")]
        public DateTime TransactionTime { get; set; }

        /// <summary>
        /// 出入账标识
        /// </summary>
        [ExcelColumn(Name = "出入账标识")]
        public string TransactionDirection { get; set; } = string.Empty;

        /// <summary>
        /// 交易金额
        /// </summary>
        [ExcelColumn(Name = "交易金额")]
        public decimal TransactionAmount { get; set; }

        /// <summary>
        /// 账户余额
        /// </summary>
        [ExcelColumn(Name = "账户余额")]
        public decimal AccountBalance { get; set; }

        /// <summary>
        /// 交易流水号
        /// </summary>
        [ExcelColumn(Name = "交易流水号")]
        public string TransactionId { get; set; } = string.Empty;

        /// <summary>
        /// 对手户名
        /// </summary>
        [ExcelColumn(Name = "对手户名")]
        public string CounterpartyName { get; set; } = string.Empty;

        /// <summary>
        /// 对手身份证号
        /// </summary>
        [ExcelColumn(Name = "对手身份证号")]
        public string CounterpartyIdNumber { get; set; } = string.Empty;

        /// <summary>
        /// 对手卡号
        /// </summary>
        [ExcelColumn(Name = "对手卡号")]
        public string CounterpartyCardNumber { get; set; } = string.Empty;

        /// <summary>
        /// 对手开户银行
        /// </summary>
        [ExcelColumn(Name = "对手开户银行")]
        public string CounterpartyBank { get; set; } = string.Empty;

        /// <summary>
        /// 对手账号
        /// </summary>
        [ExcelColumn(Name = "对手账号")]
        public string CounterpartyAccount { get; set; } = string.Empty;

        /// <summary>
        /// 对手内部账号
        /// </summary>
        [ExcelColumn(Name = "对手内部账号")]
        public string CounterpartyInternalAccount { get; set; } = string.Empty;

        /// <summary>
        /// 对手余额
        /// </summary>
        [ExcelColumn(Name = "对手余额")]
        public decimal CounterpartyBalance { get; set; }

        /// <summary>
        /// 摘要
        /// </summary>
        [ExcelColumn(Name = "摘要")]
        public string Summary { get; set; } = string.Empty;

        /// <summary>
        /// 备注（交易相关的额外说明信息）
        /// </summary>
        [ExcelColumn(Name = "备注")]
        public string Remarks { get; set; } = string.Empty;

        /// <summary>
        /// IP地址
        /// </summary>
        [ExcelColumn(Name = "IP地址")]
        public string IP { get; set; } = string.Empty;

        /// <summary>
        /// MAC地址
        /// </summary>
        [ExcelColumn(Name = "MAC地址")]
        public string MAC { get; set; } = string.Empty;

        /// <summary>
        /// 现金标志
        /// </summary>
        [ExcelColumn(Name = "现金标志")]
        public string CashFlag { get; set; } = string.Empty;

        /// <summary>
        /// 交易类型
        /// </summary>
        [ExcelColumn(Name = "交易类型")]
        public string TransactionType { get; set; } = string.Empty;

        /// <summary>
        /// 币种
        /// </summary>
        [ExcelColumn(Name = "币种")]
        public string Currency { get; set; } = string.Empty;

        /// <summary>
        /// 交易发生地
        /// </summary>
        [ExcelColumn(Name = "交易发生地")]
        public string TransactionLocation { get; set; } = string.Empty;


        /// <summary>
        /// 交易发生地经度
        /// </summary>
        [ExcelColumn(Name = "交易发生地经度")]
        public string TransactionLocationLong { get; set; } = string.Empty;

        /// <summary>
        /// 交易发生地纬度
        /// </summary>
        [ExcelColumn(Name = "交易发生地纬度")]
        public string TransactionLocationLat { get; set; } = string.Empty;

        /// <summary>
        /// 交易网点号
        /// </summary>
        [ExcelColumn(Name = "交易网点号")]
        public string BranchCode { get; set; } = string.Empty;

        /// <summary>
        /// 交易网点名称
        /// </summary>
        [ExcelColumn(Name = "交易网点名称")]
        public string BranchName { get; set; } = string.Empty;

        /// <summary>
        /// 冲正标志
        /// </summary>
        [ExcelColumn(Name = "冲正标志")]
        public string ReversalFlag { get; set; } = string.Empty;

        /// <summary>
        /// 源文件名
        /// </summary>
        [ExcelColumn(Name = "源文件名")]
        public string SourceFileName { get; set; } = string.Empty;

        /// <summary>
        /// 交易成功标志
        /// </summary>
        [ExcelColumn(Name = "交易成功标志")]
        public string SuccessFlag { get; set; } = string.Empty;

        /// <summary>
        /// 类型
        /// </summary>
        [ExcelIgnore]
        public JudicialCaseTransactionRecord_Type Type { get; set; }

        [SqlSugar.SugarColumn(IsIgnore = true)]
        [ExcelColumn(Name = "类型")]
        public string TypeName
        {
            get
            {
                switch (Type)
                {
                    case JudicialCaseTransactionRecord_Type.BankCard:
                        return "电诈银行卡";
                    case JudicialCaseTransactionRecord_Type.WeChat:
                        return "电诈微信";
                    case JudicialCaseTransactionRecord_Type.AliPay:
                        return "电诈支付宝";
                    case JudicialCaseTransactionRecord_Type.EiBankCard:
                        return "经侦银行卡";
                    case JudicialCaseTransactionRecord_Type.AliPay129:
                        return "129支付宝";
                    case JudicialCaseTransactionRecord_Type.WeChat129:
                        return "129微信";
                    default:
                        return "未知";
                }
            }
        }
    }

    /// <summary>
    /// 类型
    /// </summary>
    public enum JudicialCaseTransactionRecord_Type
    {

        /// <summary>
        /// 电诈银行卡
        /// </summary>
        [Description("电诈银行卡")]
        BankCard = 0,

        /// <summary>
        /// 电诈微信
        /// </summary>
        [Description("电诈微信")]
        WeChat = 1,

        /// <summary>
        /// 电诈支付宝
        /// </summary>
        [Description("电诈支付宝")]
        AliPay = 2,

        /// <summary>
        /// 经侦银行卡
        /// </summary>
        [Description("经侦银行卡")]
        EiBankCard = 3,

        /// <summary>
        /// 129支付宝
        /// </summary>
        [Description("129支付宝")]
        AliPay129 = 4,

        /// <summary>
        /// 129微信
        /// </summary>
        [Description("129微信")]
        WeChat129 = 5
    }
}
